class Person {
  name: string;
  age: number;
  constructor(name:string,age:number){
    this.name = name;
    this.age = age;
  }
  setAge(age: number) {
    this.age = age;
  }
  setName(name:string){
    this.name = name;
  }
}

const person = new Person('ts',100);
person.setName('this is a ts')
console.log('person: ', person);